#include <iostream>
#include <vector>
#include <algorithm>

bool cmp(std::pair<int, int> a, std::pair<int, int> b)
{
    if (a.second < b.second)
    {
        return true;
    }
    return false;
}

int main()
{
    int N;
    std::cin >> N;

    std::vector<std::pair<int, int>> times;
    for (int i = 0; i < N; i++)
    {
        int st, per;
        std::cin >> st >> per;
        times.push_back({st, st + per});
    }

    std::sort(times.begin(), times.end(), cmp);

    int cnt = 1;
    int prev = times[0].second;
    int i = 1;
    while (i < times.size())
    {
        if (times[i].first - prev >= 15)
        {
            cnt++;
            prev = times[i].second;
        }
        i++;
    }

    std::cout << cnt << std::endl;
    return 0;
}